<%@ page import="Util.Account" %><%--
  Created by IntelliJ IDEA.
  User: 15433
  Date: 2019/7/13
  Time: 11:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String e = request.getParameter("error");
%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改信息</title>
    <link rel="stylesheet" type="text/css" href="js/mana.css">
</head>

<body >
<%

    request.setCharacterEncoding("UTF-8");
    if (request.getSession(true).getAttribute("Account") == null) {
        response.sendRedirect("index.jsp");

} else {
    Account acc = (Account) request.getSession().getAttribute("Account");
%>

<div id="content">
    <div class="login-header">
        <img src="Image/logo.png">
    </div>
    <form action="ManageServlet" method="post">
        <div class="login-input-box">
            <span class="icon icon-user"></span>
            <input type="text" readonly="readonly"  name="name" value="<%=acc.getName()%>">
        </div>
        <div class="login-input-box">
            <span class="icon icon-password"></span>
            <input type="password" name="password" value="<%=request.getParameter("Password")==null?"":request.getParameter("Password")%>"
                   placeholder="密码">
        </div>
        <div class="login-input-box">
            <span class="icon icon-password"></span>
            <input type="password" placeholder="确认密码">
        </div>
        <div class="login-button-box">
            <button   type="submit" value="登录" onclick="
if(password.value!==check.value){
    alert('密码不一致');
    return false;
}" >修改信息</button>

        </div>
    </form>

</div>
<%
    }
%>
</body>
</html>
